﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompositePattern.DemoThree
{
    public class Branch : Corp
    {
        private List<Corp> subordinateList = new List<Corp>();
        
        public Branch(string name, string position, int salary):base(name,position,salary)
        {
        }
        
        public void addSubordinate(Corp corp)
        {
            this.subordinateList.Add(corp);
        }

        public List<Corp> getSubordinate()
        {
            return this.subordinateList;
        }
    }
}
